/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.meego.common.util;

import com.google.gson.Gson;
import java.lang.reflect.Type;

/**
 *
 * @author TueHM
 */
public class JSonUtils {

    public static final Gson json = new Gson();

    public static String Serialize(Object value) {
        return json.toJson(value);
    }

    public static <T extends Object> T DeSerialize(String value, Type typeOfT) {
        T result = json.fromJson(value, typeOfT);

        return result;
    }
}
